package work;

import java.util.Scanner;

public class Work5 {

	public static void main(String[] args) {
		String s;
		Scanner sc = new Scanner(System.in);
		s = sc.nextLine();
		int i,j;
		i = sc.nextInt();
		j = sc.nextInt();
		System.out.println(reverse(s,i,j));	
	}
		
	public static String reverse(String str,int start,int end){
		char[] array = str.toCharArray();
		for(int i = start,j=end;i< j;i++,j--){
			char temp =array[i];
			array[i]=array[j];
			array[j]=temp;
		}
		String s = new String(array);
		return s;
	}
}



